package com.my.common.bean;

import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSONUtil;

import java.util.List;

/**
 * @author: marshal
 * @date: 2021-09-27 2:53 PM
 */
public class UserUtils {
    private UserUtils() {
    }

    /**
     * 获取用户列表
     *
     * @return 用户列表
     */
    public static List<User> getUserList() {
        return List.of(
                new User(1, "Tom", 20, DateUtil.parseLocalDateTime("2024-01-20 08:10:32")),
                new User(2,"Jack", 16, DateUtil.parseLocalDateTime("2024-03-20 06:30:01")),
                new User(3,"Lucy", 18, DateUtil.parseLocalDateTime("2024-05-11 11:29:54")),
                new User(4,"Michel", 21, DateUtil.parseLocalDateTime("2024-07-20 05:10:21")),
                new User(5,"Bob", 29, DateUtil.parseLocalDateTime("2024-06-20 05:10:21")),
                new User(6,"John", 16, DateUtil.parseLocalDateTime("2024-08-20 10:33:21")),
                new User(7,"Steven", 19, DateUtil.parseLocalDateTime("2024-09-11 05:10:21")),
                new User(8,"Holley", 19, DateUtil.parseLocalDateTime("2024-12-03 09:10:21")),
                new User(9,"Annie", 20, DateUtil.parseLocalDateTime("2024-10-20 13:40:33")),
                new User(10,"Annie", 20, DateUtil.parseLocalDateTime("2024-10-20 13:40:33")),
                new User(11,"Rose", 18, DateUtil.parseLocalDateTime("2024-11-01 12:13:05")));
    }

    /**
     * 获取用户列表 JSON 结构数据
     *
     * @return 用户列表 JSON 结构数据
     */
    public static String getUserJson() {
        return JSONUtil.toJsonStr(getUserList());
    }
}
